﻿@model Nop.Web.Models.Common.ContactUsModel
@using Nop.Web.Framework.UI.Captcha;
@{
    Layout = "~/Views/Shared/_ColumnsTwo3.cshtml";

    //title
    Html.AddTitleParts(T("PageTitle.ContactUs").Text);
}
<div class="contact-form">
    @Html.Action("TopicBlock", "Topic", new { systemName = "ContactUs" })
    <div class="clear">
    </div>
    @if (Model.SuccessfullySent)
    {
        <div class="result">
            <strong>@Model.Result</strong>
        </div>        
    }
    else
    {
        using (Html.BeginForm())
        {    
        <div class="send-email">
            <table class="table-container">
                <tr>
                    <td class="message-error" colspan="2">
                        @Html.ValidationSummary(true)
                    </td>
                </tr>
                <tr class="row">
                    <td class="item-name">
                        @Html.LabelFor(model => model.FullName):
                    </td>
                    <td class="item-value">
                        @Html.TextBoxFor(model => model.FullName, new { @class = "fullname textBox width250" })
                        @Html.ValidationMessageFor(model => model.FullName)
                    </td>
                </tr>
                <tr class="row">
                    <td class="item-name">
                        @Html.LabelFor(model => model.Email):
                    </td>
                    <td class="item-value">
                        @Html.TextBoxFor(model => model.Email, new { @class = "email textBox width250" })
                        @Html.ValidationMessageFor(model => model.Email)
                    </td>
                </tr>
                <tr class="row">
                    <td class="item-name">
                        @Html.LabelFor(model => model.Enquiry):
                    </td>
                    <td class="item-value">
                        @Html.TextAreaFor(model => model.Enquiry, new { @class = "enquiry width400 height150" })
                        @Html.ValidationMessageFor(model => model.Enquiry)
                    </td>
                </tr>
                @if (Model.DisplayCaptcha)
                {
                    <tr class="row">
                        <td class="item-name">
                            &nbsp;
                        </td>
                        <td class="item-value">
                            @Html.Raw(Html.GenerateCaptcha())
                        </td>
                    </tr>
                }
                <tr class="row">
                    <td class="item-name">
                    </td>
                    <td class="buttons">
                        <input type="submit" id="send-email" name="send-email" class="contactusbutton" value="@T("ContactUs.Button")" />
                    </td>
                </tr>
            </table>
        </div>  
        }
    }
</div>
